const { getXpathStr } = require('./getXpathStr')

function pageType(page) {
  return async (xpath, val) => {
    const btn = await page.waitForSelector(getXpathStr(xpath))
    await btn.type(val)
  }
}

module.exports = {
  pageType
}